const mongoose = require("mongoose");

const shopGoodsSchema = new mongoose.Schema({
  //商品
  name: String, // 名称
  goodsNum: Number, //库存
  price: Number, //价格
  production: String, // 生产日期
  shelfLife: String, // 保质期
  producer: String, // 产地
  weight: String, // 重量
  images: String, //商品图片
  desc: String, // 商品描述
  discount: Boolean, //是否是打折商品
  type: String, //商品大种类
  kind: String, //商品小种类
  shopId: {
    type: mongoose.Schema.Types.ObjectId,
    ref: "shop-stores",
  },
});

mongoose.model("shop-goods", shopGoodsSchema, "shop-goods");
